<?php

namespace App\Models;

use Dcat\Admin\Models\Administrator;
use Dcat\Admin\Traits\HasDateTimeFormatter;

use Illuminate\Database\Eloquent\Model;

class Curriculum extends Model
{
    use HasDateTimeFormatter;
    protected $table = 'curriculum';

    public function mechanism()
    {
        return $this->belongsTo(Administrator::class, 'mechanism_id');
    }

    public function class()
    {
        return $this->belongsTo(Classes::class, 'class_id');
    }

    public function book()
    {
        return $this->belongsTo(TeachingMaterial::class, 'book_id');
    }
}
